<div id="main">
<div id="contents">
<form method="post" name="autoform" id="form1">
<div class="frame_tab_layer" style="padding-left:25px;padding-top:5px;">
    <table class="cmenutitle" width="100%" cellspacing="0" cellpadding="0" border="0">
        <tbody>
        <tr>
            <td id="linetype" class="frame_tab_line" colspan="2"> </td>
        </tr>
        </tbody>
    </table>
</div>
<fieldset>
<legend id="linetype_title">PHONE</legend>
<fieldset>
    <legend>
        <label sid="extension.account"></label>
    </legend>
    <div class="frame_tab_layer">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle">
            <tr>
                <td class="frame_tab_left">
                    <span class="errormsg" id="img700">&#160;</span>
                    <label sid="extension.account_name"></label>
                   </td>
                <td class="frame_tab_right">
                    <input type="text" name="id700" id="id700" size="11" maxlength="30" onblur="read();"/>
                    <span id="id700Tip" class="x-form-tip"></span>
                </td>
            </tr>
            <tr>
                <td class="frame_tab_left"><span class="errormsg" id="img703">&#160;</span>
                    <label sid="extension.account_passwd"></label>
                  </td>
                <td class="frame_tab_right">
                    <input type="password" name="id703" id="id703" size="11" maxlength="30"/>
                    <span id="id703Tip" class="x-form-tip"></span>
                </td>
            </tr>
            <tr>
                <td class="frame_tab_left"><span class="errormsg" id="img706">&#160;</span>
                    <label sid="extension.account_nickname"></label>
                </td>
                <td class="frame_tab_right">
                    <input type="text" name="id706" id="id706" size="11" maxlength="30"/></td>
            </tr>
            <tr>
                <td class="frame_tab_left"><label for="id653">
                    <label sid="extension.group"></label>
                </label></td>
                <td class="frame_tab_right"><select name="id653" id="id653">
                    <option value="">--</option>
                </select></td>
            </tr>
            <tr>
                <td class="frame_tab_left"><label for="id708">
                    <label sid="extension.role"></label>

                </label></td>
                <td class="frame_tab_right">
                    <select name="id708">
                        <option value="U" sid="extension.user">
                        </option>
                        <option value="O" sid="extension.attendant">
                        </option>
                        <option value="P" sid="extension.manager">
                        </option>
                    </select></td>
            </tr>
        </table>
    </div>
</fieldset>
<fieldset>
<legend>
    <label sid="sip_trunk.table2_title"></label>
</legend>
<div class="frame_tab_layer">
<table class="cmenutitle" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody>
    <tr>
        <td class="frame_tab_left"><span class="errormsg" id="img432">&#160;</span>&#160;<label sid="extension.passwd"></label></td>
        <td class="frame_tab_right"><input type="password" name="id432" id="id432"/></td>
    </tr>
    <tr>
        <td class="frame_tab_left">
            <span id="img592" class="errormsg">&nbsp;</span>
            <label for="id592">
                <label sid="extension.call_with_pin"></label>
            </label>
        </td>
        <td class="frame_tab_right">
            <input id="id592" type="checkbox" name="id592">
        </td>
    </tr>
    <tr>
        <td class="frame_tab_left">
            <span id="img587" class="errormsg">&nbsp;</span>
            <label for="id587">
                <label sid="extension.email"></label>
            </label>
        </td>
        <td class="frame_tab_right">
            <input id="id587" type="text" name="id587">
            <span class="x-form-tip" id="id587Tip"></span>

        </td>
    </tr>
    <tr>
        <td class="frame_tab_left">
            <span id="img471" class="errormsg">&nbsp;</span>
            <label for="id471">
                <label sid="extension.mobile"></label>
            </label>
        </td>
        <td class="frame_tab_right">
            <input id="id471" type="text" name="id471">
        </td>
    </tr>
    <tr id="tr468">
        <td class="frame_tab_left">
            <span id="img468" class="errormsg">&nbsp;</span>
            <label for="id468">
                <label sid="extension.color_ring_back"></label>
            </label>
        </td>
        <td class="frame_tab_right">
            <input id="id468" type="text" name="id468">
        </td>
    </tr>
    <tr id="tr470">
        <td class="frame_tab_left">
            <span id="img470" class="errormsg">&nbsp;</span>
            <label for="id470">
                <label sid="extension.spd_dial_list"></label>
            </label>
        </td>
        <td class="frame_tab_right">
            <input id="id470" type="text" name="id470">
        </td>
    </tr>
    <tr id="phone1">
        <td class="frame_tab_left">
            <label for="id445">
                <label sid="extension.hot_line"></label>
            </label>
        </td>
        <td class="frame_tab_right">
            <select onchange="read();" name="id445">
                <option value="0" sid="extension.hot_line_disable"></option>
                <option value="1" sid="extension.hot_line_immediate"></option>
                <option value="2" sid="extension.hot_line_delay_mode"></option>
            </select>
            <span id="img469" class="errormsg" style="padding-left:20px;">&nbsp;</span>
            <label for="id469">
                <label sid="extension.hot_line_number"></label>
            </label>
            <span style="padding-left:10px;">&nbsp;</span>
            <input id="id469" type="text" name="id469">
        </td>
    </tr>
    <tr id="tr472">
        <td class="frame_tab_left">
            <span id="img472" class="errormsg">&nbsp;</span>
            <label for="id472">
                <label sid="extension.forking_number"></label>
            </label>
        </td>
        <td class="frame_tab_right">
            <input id="id472" type="text" name="id472">
        </td>
    </tr>
    <tr>
        <td class="frame_tab_left">
            <span id="img473" class="errormsg">&nbsp;</span>
            <label for="id473">
                <label sid="extension.incoming_call_blocking"></label>
            </label>
        </td>
        <td class="frame_tab_right">
            <input id="id473" type="text" name="id473">
        </td>
    </tr>
    <tr>
        <td class="frame_tab_left">
            <span id="img675" class="errormsg">&nbsp;</span>
            <label for="id675">


                <label sid="extension.secretary"></label>
            </label>
        </td>
        <td class="frame_tab_right">
            <input id="id675" type="text" onkeyup="read();" onblur="read()" name="id675">
            <span style="padding-left:20px;">&nbsp;</span>
            <font id="name369">
                <label for="id369">
                    <label sid="extension.enable"></label>
                </label>
            </font>
            <span style="padding-left:5px;">&nbsp;</span>
            <input id="id369" type="checkbox" name="id369">
        </td>
    </tr>
    </tbody>
</table>
<br>
<center>
    <table class="cmenutitle" width="90%" cellspacing="0" cellpadding="0" border="0">
        <tbody>
        <tr>
            <td width="5%">
                <input id="id596" type="checkbox" name="id596">
            </td>
            <td width="20%">
                <label for="id596">
                    <label sid="extension.pickup"></label>
                </label>
            </td>
            <td width="5%">
                <input id="id435" type="checkbox" name="id435">
            </td>
            <td width="20%">
                <label for="id435">
                    <label sid="extension.call_waiting"></label>
                </label>
            </td>
           <!-- <td>
                <input id="id192" type="checkbox" name="id192">
            </td>
            <td>
                <label for="id192">
                    <label sid="extension.call_monitoring"></label>
                </label>
            </td>
            <td>
                <input id="id189" type="checkbox" name="id189">
            </td>
            <td>
                <label for="id189">
                    <label sid="extension.call_monitoring_prohibit"></label>
                </label>
            </td> -->
            <td>
                <input id="id444" type="checkbox" name="id444">
            </td>
            <td>
                <label for="id444">
                    <label sid="extension.DND"></label>
                </label>
            </td>
            <td>
                <input id="id355" type="checkbox" name="id355">
            </td>
            <td>
                <label for="id355">
                    <label sid="extension.distinctive_ring"></label>
                </label>
            </td>
        </tr>
        <tr>
            <td>
                <input id="id434" type="checkbox" name="id434">
            </td>
            <td>
                <label for="id434">
                    <label sid="extension.call_hold"></label>
                </label>
            </td>
            <td>
                <input id="id439" type="checkbox" name="id439">
            </td>
            <td>
                <label for="id439">
                    <label sid="extension.call_transfer"></label>
                </label>
            </td>
            <td>
                <input id="id593" type="checkbox" name="id593">
            </td>
            <td>
                <label for="id593">
                    <label sid="extension.outbound_transfer"></label>
                </label>
            </td>
            <td>
                <input id="id448" type="checkbox" name="id448">
            </td>
            <td>
                <label for="id448">
                    <label sid="extension.reverse_battery"></label>
                </label>
            </td>
        </tr>
        <!--<tr>
            <td>
                <input id="id359" type="checkbox" name="id359">
            </td>
            <td>
                <label for="id359">
                    <label sid="extension.recording_on_demand"></label>
                </label>
            </td>

        </tr>-->
        </tbody>
    </table>
</center>
</div>
</fieldset>
</fieldset>
<div class="submitFooter">
    <input sid="sbutton.save" class = "button" type ="button" name = "submit" id="submit"/>
    <input id="super_button" class="button" type="button" name="ip_extension_stat" sid="ivr_menu.basic">
</div>
</form>
</div>
</div>
<br>
<div id="helpContainer">
    <div id="help">
        <div>
            <h2>
                <label sid="share.help"></label>
            </h2>
        </div>
        <div id="helpBody">
            <dl>

                <dt class="term">
                    <label sid="desktopphones.sp3"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp3Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp3_5"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp3_5_step1"></label><br>
                    <label sid="desktopphones.sp3_5_step1_2"></label><br><br>
                    <label sid="desktopphones.sp3_5_step2"></label><br>
                    <label sid="desktopphones.sp3_5_step2_2"></label><br><br>
                    <label sid="desktopphones.sp3_5_step3"></label><br>
                    <label sid="desktopphones.sp3_5_step3_2"></label>
                </dd>

                <dt class="term">
                    <label sid="desktopphones.spp4"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.spp4Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_1"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_1Tip"></label>
                </dd>

                <dt class="term">
                    <label sid="desktopphones.sp4_5"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_5Tip"></label><br>
                    <label sid="desktopphones.sp4_5Tip2"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_6"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_6_step1"></label><br>
                    <label sid="desktopphones.sp4_6_step1_2"></label><br><br>
                    <label sid="desktopphones.sp4_6_step2"></label><br>
                    <label sid="desktopphones.sp4_6_step2_2"></label>
                </dd>

                <dt class="term">
                    <label sid="desktopphones.sp4_8"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_8Tip"></label>
                </dd>


                <dt class="term">
                    <label sid="desktopphones.sp4_11"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_11Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_12"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_12Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_19"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_19Tip"></label>
                </dd>
                <dt class="term">
                <label sid="desktopphones.sp4_13"></label>
            </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_13Tip"></label>
                </dd> <dt class="term">
                <label sid="desktopphones.sp4_14"></label>
            </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_14Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="desktopphones.sp4_15"></label>
                </dt>
                <dd class="definition">
                    <label sid="desktopphones.sp4_15Tip"></label>
                </dd>

            </dl>

        </div>
    </div>
</div>
<script type="text/javascript" src="js/getSelectList.js"></script>
<script type="text/javascript">

    $(document).ready(function(){
        var sendtext = "&id=4000";
        for(var i=1;i<7;i++) {
            sendtext +="&line_id="+i+"&id=758";
        }
        getSelectList(sendtext);
        setTimeout("read()",500);
        if($("[name=id675]").val()!=="") {
            $("[name=id369]").show();
            $("#name369").show();
        }
        $.formValidator.initConfig({formID:"form1",debug:false,submitOnce:true,submitButtonID:"submit",
            onError:function(msg, obj, errorlist) {

            },
            onSuccess:function(){
                $(".errormsg").html('');
                var nonames = new Array("submit","extension_batch","extension_stat","add_extension","ip_extension_batch","ip_extension_stat","id366","id584","line");
                var settext = "&line_id="+getCookie("line_id");
                settext += getSetText(nonames);
                settext=settext.replace(/\#/g,"%23");
                submitform(modules["set_data"],settext);
            }
        });
        $("#id700").formValidator({
            onFocus:errmsg.Info10
        }).regexValidator({
                    regExp:regexEnum.num_letter,
                    onError:errmsg.Info1
                });

        $("#id703").formValidator({
            onFocus:errmsg.Info11
        }).regexValidator({
                    regExp:regexEnum.num_letter,
                    onError:errmsg.Info1
                });

        $("#id587").formValidator({
            onFocus:errmsg.Info12
        }).regexValidator({
                    regExp:regexEnum.email,
                    onError:errmsg.Info1
                });
         $("#id587,#id700,#id703").unFormValidator(true);
         $("#id587,#id700,#id703").bind("click",function(){
            $(this).unFormValidator(false);
        });
         $("#id587,#id700,#id703").bind("blur",function(){
             if($(this).val()==""){
              $(this).unFormValidator(true);
             }
         })

        $("#super_button").bind("click",function(){
            loadNewHtml("extension_main_load.htm");
        });
    });


	function read() {
	if($("[name=id675]").val()!=="") {
		$("[name=id369]").show();
		$("#name369").show();
	}else if($("[name=id675]").val()=="") {
		$("[name=id369]").hide();
		$("#name369").hide();
	}
	if($("#phone1").attr("display")==""&&$("#tr469").attr("display")=="") {
		if($("[name=id445]").val()=='0') {
			$('#tr469').hide();
		}else {
			$('#tr469').show();
		}
	}$("#436").checked=true;
	$("#429").checked=true;
	$("#446").checked=true;
	$("#438").checked=true;
}
</script>

